package com.mathassistant.client.event.exercise;

import com.google.gwt.event.shared.GwtEvent;
import com.mathassistant.shared.TopicDTO;

public class ExerciseBackNextEvent extends GwtEvent<ExerciseBackNextEventHandler>{

	public static final Type<ExerciseBackNextEventHandler> TYPE = new Type<ExerciseBackNextEventHandler>();
	
	private TopicDTO topic;
	private int indexCurBeginList = 0;
	
	public ExerciseBackNextEvent(TopicDTO topc, int indexCurBegin){
		this.topic = topc;
		this.indexCurBeginList = indexCurBegin;
	}
	
	public TopicDTO getTopic(){
		return topic;
	}
	
	public int getIndexCurBeginList(){
		return indexCurBeginList;
	}
	
	@Override
	public Type<ExerciseBackNextEventHandler> getAssociatedType() {
		// TODO Auto-generated method stub
		return TYPE;
	}

	@Override
	protected void dispatch(ExerciseBackNextEventHandler handler) {
		// TODO Auto-generated method stub
		handler.onBackNext(this);
	}

}
